[2.3] Never delete all changelog rows#13575
Closed
toddbc wants to merge 1 commit intomagento:2.3-developfrom
Closed
[2.3] Never delete all changelog rows#13575toddbc wants to merge 1 commit intomagento:2.3-developfrom
toddbc wants to merge 1 commit intomagento:2.3-developfrom
Conversation
Otherwise, indexes get confused on MySQL restart. The changelog can start over at 1, and mview_state will be ahead. This causes incremental indexing to simply not execute. To prevent this, we always keep the highest version id row, which makes MySQL handle auto_increment as expected, even after a restart.
This was referenced Feb 9, 2018
Contributor
|
Mysql bugreport - https://bugs.mysql.com/bug.php?id=199 |
Contributor
Author
|
@magento-engcom-team anything I could do to move this forward? |
Contributor
|
This issue was fixed in #14636 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When cleaning ALL changelog rows, indexes get confused after a MySQL restart. The changelog version ids can start over at 1, and mview_state will be ahead of it.
This causes incremental indexing to simply not execute.
Description
To prevent this, we always keep the highest version id row, which makes MySQL handle auto_increment as expected, even after a restart.
Fixed Issues (if relevant)
See Cloud issue 14833.
Manual testing scenarios
php bin/magento indexer:set-mode schedule.Actual results (before this PR):
At step 5, zero entries remain in the _cl table.
At step 8, the changes never index.
Expected results:
At step 5, one entry remains in the _cl table.
At step 8, the changes successfully update.
Contribution checklist